Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bitmex-adapter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group 'com.bookmap.api.adapter'
version = '0.8.0.10'
version = '0.8.0.11'

targetCompatibility = 1.8
sourceCompatibility = 1.8
Expand All @@ -19,16 +19,16 @@ repositories {

dependencies {
compileOnly group: 'com.bookmap.api', name: 'api-core', version: '7.4.0.10'
compileOnly group: 'commons-io', name: 'commons-io', version: '2.6'
compileOnly group: 'commons-codec', name: 'commons-codec', version: '1.10'
compileOnly group: 'org.apache.commons', name: 'commons-collections4', version: '4.1'
compileOnly group: 'org.apache.commons', name: 'commons-lang3', version: '3.7'
compileOnly group: 'com.google.code.gson', name: 'gson', version: '2.4'
compileOnly group: 'org.eclipse.jetty.aggregate', name: 'jetty-all', version: '9.3.8.v20160314'
compileOnly group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.2'
compileOnly group: 'javax.xml.bind', name: 'jaxb-api', version: '2.2.4'
compileOnly group: 'commons-io', name: 'commons-io', version: '2.6'
}

jar {
archiveBaseName = '7.4.0.10---7.6.1.9999---0---bitmex-adapter--'
archiveBaseName = '7.4.0.10---7.7.1.9999---0---bitmex-adapter--'
}
Original file line number Diff line number Diff line change
Expand Up @@ -1236,6 +1236,15 @@ public void close() {
connector.closeSocket();
connector.setInterruptionNeeded(true);
}
if (connectorThread != null) {
connectorThread.interrupt();
try {
connectorThread.join();
} catch (InterruptedException e) {
Log.warn("Interrupted while waiting for connectorThread to terminate during shutdown", e);
Thread.currentThread().interrupt();
}
}
if (httpClientHolder != null) {
try {
httpClientHolder.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ private void reportHistoricalExecutions(String ordStatus) {

@Override
public void run() {
while (!interruptionNeeded.get()) {
while (!interruptionNeeded.get() && !Thread.currentThread().isInterrupted()) {

if (!isConnectionEstablished()) {
if (!isInitiallyConnected) {
Expand All @@ -519,7 +519,8 @@ public void run() {
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
Log.error("", e);
Thread.currentThread().interrupt();
Log.error("Interrupted while waiting for reconnection to finish", e);
throw new RuntimeException();
}
}
Expand Down Expand Up @@ -557,7 +558,8 @@ public void run() {
try {
Thread.sleep(1_000);
} catch (InterruptedException e) {
Log.error("", e);
Thread.currentThread().interrupt();
Log.error("Interrupted BmConnector run thread during sleep, likely shutting down", e);
}
}
if (executionsResetTimer != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

public class Constants {

public static final String version = "v.0.8.0.10";
public static final String version = "v.0.8.0.11";
public static final String bitmex_Wss = "wss://www.bitmex.com/realtime";
public static final String bitmex_restApi = "https://www.bitmex.com";

Expand Down