[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15896697#comment-15896697
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9689:
--------------------------------------------

Github user anshul1886 commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1845#discussion_r104339191
  
    --- Diff: 
services/console-proxy-rdp/rdpconsole/src/main/java/streamer/apr/AprSocketSource.java
 ---
    @@ -103,44 +103,46 @@ public void poll(boolean block) {
                 if (verbose)
                     System.out.println("[" + this + "] INFO: Reading data from 
stream.");
     
    -            // to unblock during reboot
    -            long startTime = System.currentTimeMillis();
                 // FIXME: If pull is destroyed or socket is closed, segfault 
will happen here
    -            int actualLength = (block) ? // Blocking read
    -                    Socket.recv(socket, buf.data, buf.offset, 
buf.data.length - buf.offset)
    -                    : // Non-blocking read
    -                        Socket.recvt(socket, buf.data, buf.offset, 
buf.data.length - buf.offset, 5000000);
    +            int actualLength;
    +            if(block) {
    +                // Blocking read
    +                actualLength = Socket.recv(socket, buf.data, buf.offset, 
buf.data.length - buf.offset);
    +            } else {
    +                // non blocking read with 5 seconds timeout
    +                Socket.timeoutSet(socket, 5000000);
    +                actualLength = Socket.recv(socket, buf.data, buf.offset, 
buf.data.length - buf.offset);
    --- End diff --
    
    @ramkatru, Will try that and get back to you


> [Hyper-V] VM console is freezing sometimes
> ------------------------------------------
>
>                 Key: CLOUDSTACK-9689
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9689
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>            Reporter: Anshul Gangwar
>            Assignee: Anshul Gangwar
>
> With some VMs console is freezing very frequently and becomes unresponsive



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to