Skip to content

Commit

Permalink
Updates for 1.0.9-M7
Browse files Browse the repository at this point in the history
  • Loading branch information
mondain committed Apr 6, 2017
1 parent a9c1716 commit 625eb77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.red5</groupId>
<artifactId>red5-parent</artifactId>
<version>1.0.9-M6</version>
<version>1.0.9-M7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>red5-server</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,9 @@ public void streamBroadcastClose(IBroadcastStream stream) {
// log w3c connect event
IConnection conn = Red5.getConnectionLocal();
// converted to seconds
long publishDuration = (System.currentTimeMillis() - stream.getCreationTime()) / 1000;
long now = System.currentTimeMillis();
long startTime = stream.getStartTime() > 0 ? stream.getStartTime() : now;
long publishDuration = Math.max((now - startTime) / 1000, 0L);
if (conn != null) {
log.info("W3C x-category:stream x-event:unpublish c-ip:{} cs-bytes:{} sc-bytes:{} x-sname:{} x-file-length:{} x-name:{}", new Object[] { conn.getRemoteAddress(), conn.getReadBytes(), conn.getWrittenBytes(), stream.getName(), publishDuration, stream.getPublishedName() });
} else {
Expand Down

0 comments on commit 625eb77

Please sign in to comment.