projects
/
xudocci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Expose input and output rate of connection.
[xudocci.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
irc
/
DccReceiver.java
diff --git
a/src/main/java/net/pterodactylus/irc/DccReceiver.java
b/src/main/java/net/pterodactylus/irc/DccReceiver.java
index
9ddca13
..
be4f145
100644
(file)
--- a/
src/main/java/net/pterodactylus/irc/DccReceiver.java
+++ b/
src/main/java/net/pterodactylus/irc/DccReceiver.java
@@
-155,7
+155,7
@@
public class DccReceiver extends AbstractExecutionThreadService {
* @return The current rate of the download, in bytes/second
*/
public long currentRate() {
* @return The current rate of the download, in bytes/second
*/
public long currentRate() {
- return
inputStream.getCurrentRate()
;
+ return
(inputStream != null) ? inputStream.getCurrentRate() : 0
;
}
/**
}
/**
@@
-164,7
+164,7
@@
public class DccReceiver extends AbstractExecutionThreadService {
* @return The overall rate of the download, in bytes/second
*/
public long overallRate() {
* @return The overall rate of the download, in bytes/second
*/
public long overallRate() {
- return
inputStream.getOverallRate()
;
+ return
(inputStream != null) ? inputStream.getOverallRate() : 0
;
}
//
}
//